//
//  XHURLString.m
//  xinhua_sx
//
//  Created by 党阳阳 on 14-7-23.
//  Copyright (c) 2014年 dangyangyang. All rights reserved.
//

#import "XHURLString.h"



@interface XHURLString()


@end

@implementation XHURLString

- (instancetype)init
{
    self = [super init];
    if (self) {
        _ipAndPort = @"http://183.203.18.45:7001";
        _areaCode = COUTURYCODE; //复制时替换成 县区code
        
    }
    return self;
}

-(NSString*)getColumnsList:(id)columnID
{
    NSLog(@"sring = %@",[NSString stringWithFormat:@"%@/xinhua/m/categoryListByParent-%@-3.html",_ipAndPort,columnID]);
    
    return [NSString stringWithFormat:@"%@/xinhua/m/categoryListByParent-%@-3.html",_ipAndPort,columnID];
}

//
-(NSString *)getHomePageNews1
{
    NSLog(@"本地新闻URL = %@",[NSString stringWithFormat:@"%@/xinhua/m/articles-list-8-%@.html?pageNo=1&pageSize=3",_ipAndPort,_areaCode]);
    return [NSString stringWithFormat:@"%@/xinhua/m/articles-list-8-%@.html?pageNo=1&pageSize=3",_ipAndPort,_areaCode];

}
//
- (NSString *)getHomePageNews2
{
    return [NSString stringWithFormat:@"%@/xinhua/m/article-news.html",_ipAndPort];
}
//
- (NSString *)getHomePageHotPic
{
    return [NSString stringWithFormat:@"%@/xinhua/m/roll-area-%@.html",_ipAndPort,_areaCode];
}

#pragma mark 新闻详情

- (NSString *)getNewsDetailWihtNewsId:(id)newsId
{
    return [NSString stringWithFormat:@"%@/xinhua/f/viewOnMobile-%@.html",_ipAndPort,newsId];
    
}

#pragma mark 某一栏目下列表

- (NSString *)getNewsListWithAreaCode:(id)areaCode itemId:(id)itemId currentPage:(id)currentPage pageSize:(id)pageSize
{
    if (pageSize ==nil) {
        pageSize = [NSNumber numberWithInt:10];
        
    }
    if (areaCode==nil) {
        areaCode = self.areaCode;
    }
    return [NSString stringWithFormat:@"%@/xinhua/m/articles-list-%@-%@.html?pageNo=%@&pageSize=%@",self.ipAndPort,itemId,areaCode,currentPage,pageSize];
    
}

#pragma mark 所有栏目
- (NSString *)getAllCategory
{
    return [NSString stringWithFormat:@"%@/xinhua/m/AllCategory.html",self.ipAndPort];
    
}

#pragma mark 大栏目下的几条新闻
- (NSString *)getNewsWithColumnId:(id)columnId wf:(NSString*)fff
{
    return [NSString stringWithFormat:@"%@/xinhua/m/content-%@-%@.html",self.ipAndPort,columnId,fff];
}
- (NSString *)getNewsWithColumnId:(id)columnId
{
     return [NSString stringWithFormat:@"%@/xinhua/m/content-%@-%@.html",self.ipAndPort,columnId,self.areaCode];
}
-(NSString*)getZhenwuNEW:(id)clume
{
    return [NSString stringWithFormat:@"%@/xinhua/m/zhengwu-%@-%@.html",self.ipAndPort,clume,self.areaCode];
}
-(NSString*)getHuiMingNEW:(id)clume
{
    return [NSString stringWithFormat:@"%@/xinhua/m/huiming-%@-%@.html",self.ipAndPort,clume,self.areaCode];
}
-(NSString*)getHuimingCOuID:(id)columnID
{
     return [NSString stringWithFormat:@"%@/xinhua/m/xinwen-%@-%@.html",self.ipAndPort,columnID,self.areaCode];
}
#pragma  mark 登录
+(NSString *)getLoginString
{
    return [NSString stringWithFormat:@"%s/xinhua/m/login.html?code=%@",HTTP,COUTURYCODE];
}
@end
